/*
 *  Created by lihao on 2017/10/30
 */

    'use strict';

let express = require('express');
let router = express.Router();

let distributionService = require('./service/distribution-service');

/**
 *  分发 get请求
 */

router.get('/',function(req, res, next){
    console.log('enter get...');
    distributionService.get(req, res, function(result){
        res.send(result);
    })
});

/**
 *  分发 post请求
 *
 */

router.post('/',function(req,res,next){
    console.log('enter post...');
    distributionService.post(req,res,function(result){
        res.send(result);
    });
});

module.exports = router;
